package cc.lucien.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;


/**
 * @author lucien-ma
 * @date 2021/9/8
 * @apiNote
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Account {
    @NotEmpty(message = "用户名不能为空")
    private String username;
    @Size(min = 6, max = 20, message = "密码在6-20位")
    private String password;
    @Email(regexp = "[a-z0-9A-Z]+\\@[a-zA-Z0-9]+\\.[a-zA-Z0-9]+", message = "请输入正确的邮箱")
    private String email;
    @Pattern(regexp = "[1-9][0-9]{10}", message = "请输入正确的手机号")
    private String phone;
}
